<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style lang="">
    .animate li{
    margin-right: 10px;
    display: inline-block;
}
.animate li a{
    position: relative;
    color: #9f00ff;
    text-decoration: none;
    display: block;
    padding: 10px 20px;
    border: 1px solid #dedede;
    -webkit-transition: all 0.6s ease-in;
  -moz-transition: all 0.6s ease-in;
  -ms-transition: all 0.6s ease-in;
  -o-transition: all 0.6s ease-in;
  transition: all 0.6s ease-in;
}
.animate li a:hover{
    color: #0012ff;
    border: 1px solid #4488ff;
}
.animate li a:before,.animate li a:after{
    content: '';
  display: block;
  position: absolute;
    box-sizing: border-box;
  border: 1px solid transparent;
  width: 0;
  height: 0;
}
.animate li a:before {
  bottom: 0;
  right: 0;
  -webkit-transition: border-color 0s ease-in 0.4s,width 0.2s ease-in 0.2s,height 0.2s ease-in;
  transition: border-color 0s ease-in 0.4s,width 0.2s ease-in 0.2s,height 0.2s ease-in;
}
.animate li a:after{
  top: 0;
  left: 0;
  -webkit-transition: border-color 0s ease-in 0.8s,width 0.2s ease-in 0.6s,height 0.2s ease-in 0.4s;
  transition: border-color 0s ease-in 0.8s,width 0.2s ease-in 0.6s,height 0.2s ease-in 0.4s;
}
.animate li a:hover:after,.animate li a:hover:before {
  width: 100%;
  height: 100%;
}
.animate li a:hover:before {
  border-bottom-color: #367dff;
  border-left-color: #367dff;
  -webkit-transition: border-color 0s ease-out 0.4s,width 0.2s ease-out 0.4s,height 0.2s ease-out 0.6s;
  transition: border-color 0s ease-out 0.4s,width 0.2s ease-out 0.4s,height 0.2s ease-out 0.6s;
}
.animate li a:hover:after {
  border-top-color: #367dff;
  border-right-color: #367dff;
  -webkit-transition: width 0.2s ease-out,height 0.2s ease-out 0.2s;
  transition: width 0.2s ease-out,height 0.2s ease-out 0.2s;
}
  </style>
</head>
<body>
  <ul class="animate">
           <li>
               <a href="javascript:;">鼠标移上来试试</a>
           </li>
           <li>
               <a href="javascript:;">鼠标移上来试试</a>
           </li>
           <li>
               <a href="javascript:;">鼠标移上来试试</a>
           </li>
    </ul>

</body>
</html>